#{extends 'main.html' /}
<script src="../../public/javascripts/jquery.min.js" type="text/javascript">
</script>
<script src="../../public/javascripts/jquery.ui.core.js" type="text/javascript">
</script>
<link rel="stylesheet" type="text/css" href="../../public/stylesheets/jquery-ui-1.8.1.custom.css"/>
<script src="../../public/javascripts/jquery.ui.datepicker.js" type="text/javascript">
</script>
<script type="text/javascript">
    $(function(){
        $("#datepicker").datepicker({
            dateFormat: 'dd-mm-yy'
        });
        var dateFormat = $("#datepicker").datepicker("option", "dateFormat");
        $("#datepicker").datepicker("option", "dateFormat", 'dd-mm-yy');
    });
</script>
<script type="text/javascript">
    $(function(){
        $("#datepickere").datepicker({
            dateFormat: 'dd-mm-yy'
        });
        var dateFormat = $("#datepickere").datepicker("option", "dateFormat");
        $("#datepickere").datepicker("option", "dateFormat", 'dd-mm-yy');
    });
</script>

<h2><a style ="color:#400040;" href=" @{Projects.showProject(sprint.project.getEntityId())}">${sprint.project.name}</a> > <a style ="color:#400040;" href=" @{Events.showSprints(sprint.project.getEntityId())}">Sprints</a> > <a style ="color:#400040;" href=" @{Events.showSprint(sprint.getEntityId())}">${sprint.name}</a> >  Edit<h2/><hr/>
#{form @Events.editSprint(project.getEntityId(), sprint.getEntityId())}
	<label>Name:</label> <br/>
	<input class="validate[required]" type="text" name="name" value=${sprint.name}/> <br/><br/>
	<label>Description/Goal:</label> <br/>
	<textarea class="validate[required]" name="description" id="description" rows="6" cols="20">${sprint.description}</textarea><br/>
	<label>Start Date:</label><br/> <input class="validate[required]" type="text" name="startDate" id="datepicker" value="${sprint.startDate.get(Calendar.DATE)}/${sprint.startDate.get(Calendar.MONTH) + 1}/${sprint.startDate.get(Calendar.YEAR)}" /> <br/><br/>
	<label>End Date:</label><br/> <input class="validate[required]" type="text" name="endDate" id="datepickere" value="${sprint.endDate.get(Calendar.DATE)}/${sprint.endDate.get(Calendar.MONTH)+1}/${sprint.endDate.get(Calendar.YEAR)}" /> <br/><br/>
	<input type="submit" value="Save Changes" /><a href="@{Events.showSprint(sprint.getEntityId())}"><input type="button" value="Cancel" /></a>
#{/form}